package fr.babostesting.examples.mobile.bench.virtual 
{
	import flash.events.Event;
	import fr.babos.graphic.components.base.StageWrapper;
	
	/**
	 * ...
	 * @author ...
	 */
	public class VirtualListTest2 
	{
		protected var _wrapper:StageWrapper;
		
		private var _horizontalList:VirtualList;
		private var _verticalLists:Vector.<VirtualList>;
		
		public function VirtualListTest2 ()
		{
			if (stage != null)
				init()
			else
				addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		protected function init (event:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			_wrapper = new StageWrapper(stage);
			
			initVirtualLists();
		}
		
		protected function initVirtualLists ():void
		{
			_horizontalList = new VirtualList(this, VirtualList.HORIZONTAL_ORIENTATION);
			
			_verticalLists = new <VirtualList>();
			
			var verticalList:VirtualList;
			
			for (var i:int = 0; i < 10; i++) 
			{
				verticalList = new VirtualList(this);
				
				_verticalLists.push(verticalList);
			}
		}
	}
}